
<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2021/8/4
  Time: 14:43
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
  <head>
    <title>JSTL2</title>
  </head>
  <body>
    <c:if test="${10>2}" var="result" scope="request">
        ${requestScope.result}
    </c:if>
    <c:set var="role" value="学生" scope="request"/>
    <c:choose>
        <c:when test="${requestScope.role == '老师'}">
            权限为老师
        </c:when>
        <c:when test="${requestScope.role == '学生'}">
          权限为学生
        </c:when>
        <c:otherwise>无权限</c:otherwise>
    </c:choose>
    <br/>
    <c:forEach begin="0" end="5" step="1" varStatus="status">
        ${status.index};
    </c:forEach>

    <c:forEach var="name" items="${requestScope.names}">
        ${name}
    </c:forEach>
  </body>
</html>
